package cn.hznc.domain.entity.common;

import com.alibaba.fastjson.annotation.JSONField;
import com.baomidou.mybatisplus.annotation.TableField;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.gitee.sunchenbin.mybatis.actable.annotation.Column;
import com.gitee.sunchenbin.mybatis.actable.constants.MySqlTypeConstant;
import lombok.Getter;
import lombok.Setter;

import java.util.Date;

/**
 * @Author Administrator
 * @Date 2023/3/13 11:50
 */
@Getter
@Setter
public class BaseEntity {
    /**
     * 创建人
     */
    @TableField("create_user")
    @Column(name = "create_user", type = MySqlTypeConstant.VARCHAR, length = 50)
    private String createUser;

    /**
     * 修改人
     */
    @TableField("modify_user")
    @Column(name = "modify_user", type = MySqlTypeConstant.VARCHAR, length = 50)
    private String modifyUser;

    /**
     * 修改时间
     */
    @Column(name = "modify_time", type = MySqlTypeConstant.DATETIME, length = 0)
    @TableField("modify_time")
    @JSONField(format = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    private Date modifyTime;

    /**
     * 创建时间
     */
    @Column(name = "create_time", type = MySqlTypeConstant.DATETIME, length = 0)
    @TableField("create_time")
    @JSONField(format = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    private Date createTime;
}
